from tkinter import*
def kmhums():
    kmh=float(u1.get())
    ms=kmh*1000/3600
    rez1=Label(p,text=str(ms)+' m/s')
    rez1.place(x=330,y=60)
def msukmh():
    ms=float(u2.get())
    kmh=ms*3600/1000
    rez2=Label(p,text=str(kmh)+' km/h')
    rez2.place(x=330,y=100)

p=Tk()
p.config(width=500, height=180)
t=Label(p,text='PRETVORBA SLOŽENIH MJERNIH JEDINICA - BRZINE')
t.place(x=50,y=20)

t1=Label(p,text='Unesi km/h:')
t1.place(x=30, y=60)
u1=Entry(p)
u1.place(x=110,y=60,width=80)
g1=Button(p,text='Pretvori u m/s',command=kmhums)
g1.place(x=200,y=59,width=120)

t2=Label(p,text='Unesi m/s:')
t2.place(x=30, y=100)
u2=Entry(p)
u2.place(x=110,y=100,width=80)
g2=Button(p,text='Pretvori u km/h',command=msukmh)
g2.place(x=200,y=99,width=120)
p.mainloop()
